

def int2byte(val: int):
    return val.to_bytes(1, 'big')[0]